﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Net;
using System.Text;
using System.Windows.Forms;

namespace MiuiThemeCrack
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        string themeDownloadUrl;

        private void Url_Button_Click(object sender, EventArgs e)
        {
            themeDownloadUrl = themeUrl_textBox.Text;
            //http://zhuti.xiaomi.com/detail/bc292073-fa4c-47ad-b3c3-d68f3c0b6a93
            string url_old = themeDownloadUrl;
            string url_new = url_old.Replace("detail", "download");
            WebClient myWebClient = new WebClient();
            myWebClient.DownloadFile(url_new, "C:\\temp\\theme.mtz");
        }
    }
}
